#include "Attribute.h"

Attribute::Attribute(void)
{
	metaDataCount = 0;
	lsMetadata = new Metadata[MAX_META_DATA_IN_ATTRIBUTE];
	this->key = "";
	this->value = "";
}
Attribute::Attribute(char *key, char *value, int id, int isHidden, bool isTrained) {
	this->key = key;
	this->value = value;
	this->id = id;
	this->isHidden = isHidden;
	this->isTrained = isTrained;
	metaDataCount = 0;
	lsMetadata = new Metadata[MAX_META_DATA_IN_ATTRIBUTE];
}
Attribute::~Attribute(void)
{
}
void Attribute::setMetaData(Metadata *metaData, int size) {
	lsMetadata = metaData;
	metaDataCount = size;
}

Metadata* Attribute::getMetaData(int &size) {
	size = metaDataCount;
	return lsMetadata;
}
void Attribute::addMetaData(Metadata metadata) {
	lsMetadata[metaDataCount++] = metadata;
}